-- GENERATED SPELL FOR [Ragnar Drakkarlund] --


function spell0_26451(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_26451', 538, 1)
end

function spell1_26451(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_26451', 2000, 1)
end

function Sorts_26451(pUnit, Event)
local choix_sorts_26451 = math.random(0, 1)
if choix_sorts_26451 == 0 then
pUnit:RegisterEvent('spell0_26451', 1, 1)
end
if choix_sorts_26451 == 1 then
pUnit:RegisterEvent('spell1_26451', 1, 1)
end
end

function mob26451_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26451', math.random(1500, 3000), 1)
end

function mob26451_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26451_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26451_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26451, 1, 'mob26451_Action')
RegisterUnitEvent(26451, 2, 'mob26451_Leave')
RegisterUnitEvent(26451, 3, 'mob26451_Kill')
RegisterUnitEvent(26451, 4, 'mob26451_Die')
